<?php

namespace app\index\controller;

use think\Controller;
use think\Db;

class Index extends Controller
{
    public function index()
    {
        return "首页";
    }

    public function hello()
    {
        return 'hello,thinkphp!';
    }

    public function test($name = "自己", $id)
    {
//        $data = Db::table('think_data')->find(['id' => $id]);
//        $this->assign('data', $data);
        $this->assign('name', $name);
        return $this->fetch("hello");
    }
}

